package Engine;

import java.awt.Font;
import java.io.InputStream;



import org.lwjgl.input.Keyboard;
import org.newdawn.slick.Color;
import org.newdawn.slick.TrueTypeFont;
import org.newdawn.slick.util.ResourceLoader;


@SuppressWarnings("deprecation")
public class TextRenderer {
	private TrueTypeFont font;
	public String line2 = "";
	public String line3 = "";
	public String line4 = "";
	Engine engine;
	@SuppressWarnings("deprecation")
	public TextRenderer(Engine engine){
		this.engine = engine;
		try {
				InputStream inputStream = ResourceLoader.getResourceAsStream("Engine/Ubuntu-L.ttf");
				Font awtFont = Font.createFont(Font.TRUETYPE_FONT, inputStream);
				awtFont = awtFont.deriveFont(12f); // set font size
				font = new TrueTypeFont(awtFont, true);
			} catch (Exception e) {
				e.printStackTrace();
			}
		
	}
	
	public boolean DrawDebug = false;
	@SuppressWarnings("deprecation")
	public void Render()
	{
		font.drawString(10, 10, "SuperCraft-Version: "+engine.Version, Color.yellow);
		
		if(DrawDebug){
		font.drawString(10, 25, line2, Color.yellow);
		font.drawString(10, 40, line3, Color.yellow);
		font.drawString(10, 55, line4, Color.yellow);
		}
	}

}
